#!/usr/bin/env python

import gtk
import os.path
import sys

import main_window
import welcome_dialog

if __name__ == '__main__':
    mw = main_window.MainWindow()

    # If a file is given as an argument, try to open it
    if len(sys.argv) > 1 and os.path.exists(sys.argv[1]):
        mw.open_game(sys.argv[1])        
    else:
        welcome_dialog.WelcomeDialog(mw)

    gtk.main()

